
#include <iostream>
#include "Factory.h"
#include "Operation.h"

#include "FactoryMult.h"
#include "FactoryPlus.h"
#include "FactorySub.h"

using namespace npFactoryMethod;
using namespace std;


void doFactoryMethod()
{
    Factory *factory = new FactoryMult();
    Operation *op = factory->createOperation();
    op->setFirstNum(5);
    op->setSecondNum(3);

    cout << "5 * 3 is " << op->getResult() << endl;

    if (op)
    {
        delete op;
        op = NULL;
    }

    if (factory)
    {
        delete factory;
        factory = NULL;
    }
}
